home *** CD-ROM | disk | FTP | other *** search
/ VRML 2.0 Sourcebook (2nd Edition) / VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso / book / mac / ch10 / 10fig11.wrl < prev    next >
Text File  |  1996-09-23  |  980b  |  52 lines

  1. #VRML V2.0 utf8
  2. # The VRML 2.0 Sourcebook
  3. # Copyright 1997 By
  4. # Andrea L. Ames, David R. Nadeau, and John L. Moreland
  5. Group {
  6.     children [
  7.     # Station Shapes
  8.         Shape {
  9.             appearance Appearance {
  10.                 material DEF BallColor Material {
  11.                     diffuseColor 1.0 0.0 0.0
  12.                 }
  13.             }
  14.             geometry Sphere { }
  15.         },
  16.         Shape {
  17.             appearance Appearance {
  18.                 material Material {
  19.                     diffuseColor 0.5 0.25 1.0
  20.                 }
  21.             }
  22.             geometry Cylinder {
  23.                 radius 2.0
  24.                 height 0.05
  25.             }
  26.         },
  27.         Shape {
  28.             appearance Appearance {
  29.                 material Material {
  30.                     diffuseColor 0.75 0.0 1.0
  31.                 }
  32.             }
  33.             geometry Cylinder {
  34.                 radius 0.15
  35.                 height 5.0
  36.             }
  37.         },
  38.     # Animation clock
  39.         DEF Clock TimeSensor {
  40.             cycleInterval 4.0
  41.             loop TRUE
  42.         },
  43.     # Animation path
  44.         DEF TransparencyPath ScalarInterpolator {
  45.             key [ 0.0, 0.5, 1.0 ]
  46.             keyValue [ 0.0, 1.0, 0.0 ]
  47.         }
  48.     ]
  49. }
  50. ROUTE Clock.fraction_changed         TO TransparencyPath.set_fraction
  51. ROUTE TransparencyPath.value_changed TO BallColor.set_transparency
  52.